# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libgnomekbd
pkgver=3.26.0+5+g1c1b585
pkgrel=1
pkgdesc="Keyboard management library"
url="https://git.gnome.org/browse/libgnomekbd"
arch=(x86_64)
license=(LGPL)
depends=(libxklavier gtk3 dconf)
makedepends=(intltool gobject-introspection git)
_commit=1c1b585dfb76c2d22affc0a090c404571981b2bd  # master
source=("git://git.gnome.org/libgnomekbd#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd "$pkgname"
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
      --disable-schemas-compile --disable-static
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd "$pkgname"
  make DESTDIR="$pkgdir" install
}
